/*
 * Copyright (c) @ justbk. 2021-2031. All rights reserved.
 */

import org.junit.Test;
import org.opengauss.util.PGobject;

import java.awt.SystemTray;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * Title: the Simple class.
 * <p>
 * Description:
 *
 * @author justbk
 * @version [issueManager 0.0.1, 2023/2/12]
 * @since 2023/2/12
 */
public class Simple {
    private static final char[] ZEROS = {'0', '0', '0', '0', '0', '0', '0', '0', '0'};
    
    @Test
    public void test12() {
        Long aaa = null;
        System.out.println("" + aaa);
    }
    @Test
    public void test11() throws SQLException {
        List<Map<String, Object>> results = new LinkedList<>();
        PGobject pg1 = new PGobject();
        pg1.setValue("1");
        results.add(new HashMap<>());
        results.add(new HashMap<>());
        results.get(0).put("aaa", pg1);
        results.get(0).put("aaa", new Long(1));
        results.get(0).put("aaa", new Long(-1));
        results.get(1).put("ccc", "ddd");
        results.get(1).put("ccc", new Long(-2));
        
        results = results.stream().map(curMap -> {
            Map<String, Object> newHashMap = new HashMap<>();
            curMap.forEach((k, v) -> {
                newHashMap.put(k, v.toString() + "eee");
            });
            return newHashMap;
        }).collect(Collectors.toList());
        
        results.stream().forEach(map -> {
            map.forEach((k,v) -> {
                System.out.println("aa" + k + "  " + v);
            });
        });
    }
}
